<%--
  Created by IntelliJ IDEA.
  User: HuangLiting
  Date: 2018/5/9
  Time: 16:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html ng-app="addSemesterApp">
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="css/admin.css"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <link rel="stylesheet" type="text/css" href="css/houtai.css"/>
    <script type="text/javascript" src="js/libs/modernizr.min.js"></script>
</head>
<body ng-controller="addSemesterController">
<jsp:include page="/header.jsp"></jsp:include>
<div class="container clearfix">
    <!--/sidebar-->
    <jsp:include page="/leftBar.jsp"></jsp:include>
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="#" color="#white">首页</a>
                <span class="crumb-step">&gt;</span><span class="crumb-name">教学日历管理</span>
                <span class="crumb-step">&gt;</span><span class="crumb-name">新增学期</span>
            </div>
        </div>
        <div class="new_function_area">
            <blockquote class="layui-elem-quote layui-quote-nm">
                <div class="input-group-search">
                    <label class="layui-form-label padding-form-label"><i class="require-red">*</i>学期编号</label>
                    <div class="layui-input-block padding-form-input">
                        <input id="semeserId" type="text" placeholder="请输入学期编号" ng-model="semesterId"/>
                        <span style="font-size: 12px; color: #cccccc">（格式：2017_2018_2）</span>
                    </div>
                </div>
                <div class="input-group-search">
                    <label class="layui-form-label padding-form-label"><i class="require-red">*</i>学期名称</label>
                    <div class="layui-input-block padding-form-input">
                        <input id="semesterName" type="text" placeholder="请输入学期名称" ng-model="semesterName"/>
                        <span style="font-size: 12px; color: #cccccc">（格式：2017_2018下学期）</span>
                    </div>
                </div>
                <div class="input-group-search">
                    <label class="layui-form-label padding-form-label"><i class="require-red">*</i>学期周数</label>
                    <div class="layui-input-block padding-form-input">
                        <input id="weekNum" type="text" placeholder="该学期共有多少周" ng-model="weekNum"/>
                    </div>
                </div>
                <div class="input-group-search">
                    <label class="layui-form-label padding-form-label"><i class="require-red">*</i>学期开始日期</label>
                    <div class="layui-input-block padding-form-input">
                        <input id="startDate" type="date"/>
                    </div>
                </div>
                <div class="input-group-search">
                    <div class="layui-form-label padding-form-label">
                    </div>
                    <div class="layui-input-block padding-form-input">
                        <button class="layui-btn layui-btn-small" id="search" ng-click="produceWeeks()">
                            <%--<i class="layui-icon">&#xe615;</i>--%> 生成周次表
                        </button>
                    </div>
                </div>
            </blockquote>
            <fieldset class="layui-elem-field">
                <legend>学期</legend>

                <div class="layui-field-box layui-form">
                    <table class="layui-table admin-table fix-table-layout">
                        <thead>
                        <tr>
                            <th>学期编号</th>
                            <th>学期名</th>
                            <th>学期开始时间</th>
                            <th>学期结束时间</th>
                            <th>周次数</th>
                        </tr>
                        </thead>
                        <tbody id="scontent">
                        <tr ng-if="semester.semesterId!=null">
                            <td ng-bind="semester.semesterId"></td>
                            <td ng-bind="semester.semesterName"></td>
                            <td ng-bind="semester.semesterStartDate"></td>
                            <td ng-bind="semester.semesterEndDate"></td>
                            <td ng-bind="semester.weekQuantity"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <fieldset class="layui-elem-field">
                <legend>周次表</legend>
                <div class="layui-field-box layui-form">
                    <table class="layui-table admin-table fix-table-layout">
                        <thead>
                        <tr>
                            <th>周次编号</th>
                            <th>周次名</th>
                            <th>周次开始时间</th>
                            <th>周次结束时间</th>
                        </tr>
                        </thead>
                        <tbody id="content">
                        <tr ng-repeat="msg in weeks">
                            <td ng-bind="msg.weekid"></td>
                            <td ng-bind="'第'+msg.weekNum+'周'"></td>
                            <td ng-bind="msg.weekStartDate"></td>
                            <td ng-bind="msg.weekEndDate"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <blockquote class="layui-elem-quote layui-quote-nm">
                <div class="input-group-search">
                    <div class="layui-input-block padding-form-input">
                        <button class="layui-btn" id="contact" ng-click="setWeeks()">
                            <%--<i class="layui-icon">&#xe615;</i>--%> 确认保存
                        </button>
                        <button class="layui-btn layui-btn-primary" ng-click ="backToSmList()">
                            <%--<i class="layui-icon">&#xe615;</i>--%> 取消
                        </button>
                    </div>
                </div>
            </blockquote>
        </div>
    </div>
    <!--/main-->
</div>
</body>
<script src="js/jquery.min.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/addsemester.js"></script>
</html>
